#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int count_bit_1(unsigned int n);
int main()
{
	int input = 0;
	scanf("%d", &input);
	int ret = count_bit_1(input);
	printf("%d\n", ret);
	return 0;
}
int count_bit_1(int num)
{
	int count = 0;
	while (num)
	{
		if ((num % 2) == 1)
			count++;
		num /= 2;
	}
	return count;
}